Skip to content

IH-642: Restructure xs-trace to use Cmdliner #5778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

contificate
Copy link
Contributor

The xs-trace utility is restructured to enhance its readability and, to aid with potential future extension, its CLI is reimplemented in terms of Cmdliner.

It is hoped that the current command modes are consistent with what was already expected by xs-trace, i.e. xs-trace (cp|mv)

These changes should make it simpler to extend this utility with more functionality. For example, there is an idea to add some short conversion routines from Zipkinv2 to Google's Catapult trace format - so that single host triaging can bypass heavy distributed tracing services and use functionality built into Chrome (or the online Perfetto trace viewer).

image
image

@contificate contificate marked this pull request as ready for review July 4, 2024 15:11
@contificate
Copy link
Contributor Author

Marking this as ready for review. These changes are pretty isolated but I suspect there will be some suggestions for better descriptions of the arguments, commands, man page, etc.

I've tested this on a host manually and it seems to work.

@contificate contificate requested a review from snwoods July 4, 2024 15:15
@contificate
Copy link
Contributor Author

Pushed a fixup commit to address review comments.
If this gets approved, it should be squashed.

Copy link
Contributor

@snwoods snwoods left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! You've done a great job of cleaning this up

@contificate
Copy link
Contributor Author

Thanks for the reviews.

I've added the "don't merge yet" label as I think it would be good to run a test case, if possible (although I'm unsure if the sequence file describes tests that can easily be made to run). That said, testing was done from a host and all was working fine.

I'll address the other review comments soon.

The xs-trace utility is restructured to enhance its readability and, to aid
with potential future extension, its CLI is reimplemented in terms of Cmdliner.

It is hoped that the current command modes are consistent with what was already
expected by xs-trace, i.e. xs-trace (cp|mv) <src> <endpoint>

These changes should make it simpler to extend this utility with more
functionality. For example, there is an idea to add some short conversion
routines from Zipkinv2 to Google's Catapult trace format - so that single
host triaging can bypass heavy distributed tracing services and use
functionality built into Chrome (or the online Perfetto trace viewer).

Signed-off-by: Colin James <colin.barr@cloud.com>
@contificate
Copy link
Contributor Author

Rebased so I could squash the review fixups.
The test sequence has passed the regression tests, so this is ready to merge (assuming CI passes).

@lindig
Copy link
Contributor

lindig commented Jul 9, 2024

Please merge this.

@contificate contificate merged commit b0e0bab into xapi-project:master Jul 9, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants